docs(automation): define the Coven-to-Psyche automation adapter contract - #5
Open
CompleteDotTech wants to merge 1 commit into
Open
docs(automation): define the Coven-to-Psyche automation adapter contract#5CompleteDotTech wants to merge 1 commit into
CompleteDotTech wants to merge 1 commit into
Conversation
Publish the transport-neutral automation adapter contracts for issue OpenCoven#18: - docs/AUTOMATION-ADAPTER.md: ownership boundary, semantic separation of the seven identifier layers, invocation/event/result/error contracts, state machines reusing the frozen GraphState/NodeState/CancellationState vocabularies, adoption/idempotency/conflict rules, cancellation and recovery semantics, changefeed/backpressure rules, the PsycheAutomationPort seam, twenty golden scenarios mapped to proposed suites, verification mapping, cross-repo canary requirements, and five maintainer decisions with alternatives considered. - JSON Schema (draft 2020-12) for psyche.automation_invocation.v1, psyche.automation_event.v1, psyche.automation_result.v1, and psyche.automation_error.v1 under docs/schemas/automation-adapter/. - Canonical golden examples (invocation envelope, first chained event, terminal result, referenced brief) with recomputed SHA-256 digests. Spec-only change: no runtime code paths are touched. Refs OpenCoven#18 Signed-off-by: Timothy Wayne Gregg <5861166+CompleteDotTech@users.noreply.github.com>
CompleteDotTech
marked this pull request as ready for review
August 30, 2026 16:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Spec/design artifact for the Psyche adapter by which a Coven automation occurrence invokes Psyche for multi-step, multi-lane, approval-aware orchestration without transferring schedule, occurrence, or run authority into Psyche. Spec-only change: no runtime code paths are touched.
What lands in this PR:
docs/AUTOMATION-ADAPTER.md— the design document: canonical boundary (Coven owns / Psyche owns / neither), semantic separation of the seven identifier layers (occurrence, run, attempt, invocation, task/lane/lease, worker session, artifacts) with one ownership source each, invocation/event/result/error contracts, state machines that reuse the already-frozenGraphState/NodeState/CancellationStatevocabularies (crates/psyche-core/src/contracts/graph.rs,crates/psyche-core/src/contracts/execution.rs), adoption/idempotency/conflict rules reusing the store's immediate-transaction + canonical-bytes replay semantics (crates/psyche-store/src/execution_bindings.rs), cancellation/timeout/restart/recovery semantics, changefeed/backpressure rules, thePsycheAutomationPortseam (transport-neutral, mirroringCovenPortidioms), twenty golden scenarios mapped to proposed suites, a verification/canary plan, and five maintainer decisions with alternatives considered.docs/schemas/automation-adapter/:psyche.automation_invocation.v1,psyche.automation_event.v1,psyche.automation_result.v1,psyche.automation_error.v1— strict (additionalProperties: falseeverywhere), safe-integer and 1 MiB bounds matchingcrates/psyche-core/src/contracts/mod.rs, digest forms matchingcrates/psyche-core/src/digest.rs.invocation_digest= sha256 over the canonicalinvocationcontent, theAdoptionRequestenvelope precedent), first chained event (chain rooted at the adoptedinvocation_digest), terminal result (result_digest), and the referenced orchestration brief.Key design stances (details + alternatives in the doc):
invocation_idis the idempotency key; the digest over its canonical bytes detects same-key/different-bytes conflicts. Timeout after possible adoption reconciles by lookup, never by a new key.automation.definition_*fields are pinned evidence, not executable policy. No Psyche API creates or edits automation schedules.binding_mismatch,principal_mismatch,authority_expired, …) are durable, payload-light evidence.ExecutionBinding(att_) is deliberately not reused for the automation layers.Issue
Refs OpenCoven#18
Test plan
invocation_digest,result_digest, and eventpayload_digestrecomputed and match; brief digest binds the shipped brief bytes; result echoes the exact invocation correlation; exercised runtime capabilities ⊆runtime.required_capabilitiescargo fmt/clippy --workspace --all-targets -- -D warnings/cargo test --workspace --locked— deferred to CI (docs-only change; no Rust or manifest touched)